import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HelloServlet extends HttpServlet {
   /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

public void doGet(HttpServletRequest request,
                     HttpServletResponse response)
       throws ServletException, IOException {
     process(response,request);
   }

private void process(HttpServletResponse response,HttpServletRequest request) throws IOException {
	response.setContentType("text/html");
     PrintWriter out = response.getWriter();
     String docType =
       "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
       "Transitional//EN\">\n";
     out.println(docType +
                 "<HTML>\n" +
                 "<HEAD><TITLE>Hello</TITLE></HEAD>\n" +
                 "<BODY BGCOLOR=\"#FDF5E6\">\n" +
                 "<H1>Hello</H1>\n" +"<H5>name:</H5>"
                 +request.getParameter("name")+"\n<H5>nickname:</H5>"+request.getParameter("nickname")+
                 "\n</BODY></HTML>");
}
}
